chore(release): v0.9.26 hotfix - first-run load crash (#797) - #804
Conversation
First boot after upgrading to v0.9.25 threw
'TypeError: Cannot read properties of undefined (reading v)' from
IndexPersistence.loadManifestData. Some iii-state adapters return
undefined (not null) for a missing key. The load path checked
manifest.value !== null and forwarded undefined to loadManifestData,
which then read undefined.v.
Self-healing: the next debounced save rebuilt a fresh manifest, so
operation continued after the warning — but the error scared every
fresh upgrader.
Fix: treat null + undefined + non-object values as 'no manifest' and
fall through to the legacy load path. Two regression tests:
- kv.get returning undefined surfaces as a clean { bm25: null,
vector: null } load, no throw.
- kv.get returning a string (wrong shape) does not crash the
manifest path.
Files bumped (9):
package.json, plugin/.claude-plugin/plugin.json, plugin/plugin.json,
plugin/.codex-plugin/plugin.json, src/version.ts, src/types.ts,
src/functions/export-import.ts, test/export-import.test.ts,
packages/mcp/package.json
125 test files / 1381 tests pass.
Closes #797.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (12)
📝 WalkthroughWalkthroughThis patch release (0.9.26) fixes a critical first-boot crash in the index persistence layer where Changesv0.9.26 Release: Undefined Manifest Handling & Version Bump
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ohitg00#804) First boot after upgrading to v0.9.25 threw 'TypeError: Cannot read properties of undefined (reading v)' from IndexPersistence.loadManifestData. Some iii-state adapters return undefined (not null) for a missing key. The load path checked manifest.value !== null and forwarded undefined to loadManifestData, which then read undefined.v. Self-healing: the next debounced save rebuilt a fresh manifest, so operation continued after the warning — but the error scared every fresh upgrader. Fix: treat null + undefined + non-object values as 'no manifest' and fall through to the legacy load path. Two regression tests: - kv.get returning undefined surfaces as a clean { bm25: null, vector: null } load, no throw. - kv.get returning a string (wrong shape) does not crash the manifest path. Files bumped (9): package.json, plugin/.claude-plugin/plugin.json, plugin/plugin.json, plugin/.codex-plugin/plugin.json, src/version.ts, src/types.ts, src/functions/export-import.ts, test/export-import.test.ts, packages/mcp/package.json 125 test files / 1381 tests pass. Closes rohitg00#797.
Hotfix on top of v0.9.25. Closes #797.
Problem
First boot after upgrading to v0.9.25 threw:
Root cause
loadShardedDatacheckedmanifest.value !== nullbefore forwarding toloadManifestData. Some iii-state adapters returnundefined(notnull) for a missing key, soundefined !== nullwas true andloadManifestData(undefined, ...)immediately readundefined.v.Self-healing: the next debounced save rebuilt a fresh manifest, so ongoing operation continued — but the crash scared every fresh upgrader (reported by 3 users in #797 within 7 hours).
Fix
Treat
null+undefined+ non-object values as 'no manifest' and fall through to the legacy load path. Shape check stays so a malformed-but-present row still fails closed.Tests
Two regression cases in
test/index-persistence.test.ts:kv.getreturningundefined→ clean{ bm25: null, vector: null }load, no throw.kv.getreturning a string (wrong shape) → manifest path doesn't crash.Full suite: 125 files / 1381 tests pass.
Summary by CodeRabbit
Bug Fixes
Chores